package caracter;

import java.util.Scanner;

public class CuentaCaracteres {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		System.out.print("Ingrese una palabra: ");
		String theWord = scanner.next();
		System.out.print("Ingrese un caracter: ");
		String theCharacter = scanner.next();

		System.out.println("La palabra es: " + theWord);
		System.out.println("La letra buscada es: " + theCharacter);

		int index = theWord.indexOf(theCharacter);

		if (index >= 0) {
			System.out.println("El caracter si esta ");

		} else {
			System.out.println("El caracter no esta ");
		}

	}

}
